from google.appengine.ext import db

university_list = ["TAU"]

class University(db.Model):
    uni_name = db.StringProperty(required = True,choices = university_list)

class Lecturer(db.Model):
    lecturer_name = db.StringProperty(required = True)
    excelent_years = db.StringListProperty(required = True)
    likes = db.IntegerProperty(required = True,default = 0)
    
class Lecturer_Course(db.Model):
    course_name = db.StringProperty(required = True)
    course_number = db.StringProperty(required = True)
    course_year = db.IntegerProperty(required = True)
    course_semester = db.StringProperty(required = True, choices = ["A","B","SUMMER"])
    overall_course = db.FloatProperty(required = True)
    overall_lecturer = db.FloatProperty(required = True)
    education_quality = db.FloatProperty(required = True)
    attitude = db.FloatProperty(required = True)  

class Year(db.Model):
    year_number = db.IntegerProperty(required = True)
    
class Semester(db.Model):
    semester_name = db.StringProperty(required = True, choices = ["A","B","SUMMER"])
    
class Faculty(db.Model):
    faculty_name = db.StringProperty(required = True)
    
class Hug(db.Model):
    hug_name = db.StringProperty(required = True)

class Course(db.Model):
    course_name = db.StringProperty(required = True)
    course_number = db.StringProperty(required = True)
    points = db.FloatProperty(required = True)
    hours = db.FloatProperty(required = True)
    language = db.StringProperty(required = True)
    video = db.BooleanProperty(required = True)
    matalot = db.StringProperty(required = True)
    
class Havura(db.Model):
    havura_id = db.StringProperty(required = True)
    
class Group(db.Model):
    group_number = db.StringProperty(required = True)
    group_type = db.StringProperty(required = True)
    edu_type = db.StringProperty(required = True)
    matkonet = db.StringProperty(required = True)
    
class Mifgash(db.Model):
    day=db.IntegerProperty(required = True,choices = [-1,0,1,2,3,4,5,6])
    start_time = db.IntegerProperty(required = True)
    end_time = db.IntegerProperty(required = True)
    building = db.StringProperty(required = True)
    room = db.StringProperty(required = True)
    mifgash_lecturer = db.ReferenceProperty(reference_class = Lecturer, required = True)
    
class Test(db.Model):
    test_date = db.DateProperty(required = True)
    test_start_time = db.TimeProperty(required = True)
    test_end_time = db.TimeProperty(required = True) 
    moed = db.StringProperty(required = True, choices = ["A","B","EXTRA"])
    test_type = db.StringProperty(required = True)
    
class Bidding_Stats(db.Model):
    places = db.IntegerProperty(required = True)
    requested = db.IntegerProperty(required = True)
    accepted = db.IntegerProperty(required = True)
    rejected = db.IntegerProperty(required = True)
    rejected_neto = db.IntegerProperty(required = True)
    max_points = db.IntegerProperty(required = True)
    min_accepted_points = db.IntegerProperty(required = True)
    

    
class User(db.Model):
    user_id = db.UserProperty()
    lecturer_liked = db.ListProperty(unicode,default = None)

class User_Semester(db.Model):
    year_number = db.IntegerProperty(required = True)
    semester_name = db.StringProperty(required = True, choices = ["A","B","SUMMER"])
    havurot_taken = db.ListProperty(str,default = None)
    


    
    
     
    
     
    
    